package cn.sstir.hackathon.wrapper;

import cn.sgst.tool.common.page.Page;
import cn.sgst.tool.common.util.ToolUtil;

import java.util.List;
import java.util.Map;

/**
 * @author: fli
 * @email: fli@sstir.cn
 * @date: 2020/1/16 21:06
 */
public class CompanyWrapper extends BaseControllerWrapper {

    public CompanyWrapper(List<Map<String, Object>> multi) {
        super(multi);
    }

    public CompanyWrapper(Page<Map<String, Object>> pageResult) {
        super(pageResult);
    }

    @Override
    protected void wrapTheMap(Map<String, Object> map) {
        String econKind = (String) map.get("econ_kind");
        if(ToolUtil.isEmpty(econKind)){
            map.put("econ_kind","暂无类型");
        }
        String operName = (String) map.get("oper_name");
        if(ToolUtil.isEmpty(operName)){
            map.put("oper_name","暂无法定代表人");
        }
        String addressDetail = (String) map.get("address.detail");
        if(ToolUtil.isEmpty(addressDetail)){
            map.put("address.detail","暂无地址");
        }
    }
}
